<?php

namespace App\Daos\Admin;

class DbDao
{
    private static $db;
    private static $query;

    private function __construct(){
        self::$db = new \PDO('mysql:host=42.192.37.184;dbname=shopping', 'shopping', '1910a');
    }

    private function __clone(){
        // 防止类外克隆
    }

    public static function connent (){
        if (!self::$query instanceof self){
            self::$query = new self;
        }
        return self::$db;
    }
}
